import java.util.Scanner;

public class Main1{
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            String s = in.next();
            String t = in.next();
            char[] str = s.toCharArray();//aaaaaa
            char[] ch = t.toCharArray();//aaa
            int count = 0;
            for (int i = 0; i < str.length-ch.length+1; i++) {//[0-4)
                for (int j = 0; j < ch.length; j++) {
                    if (str[i + j] != ch[j]) {
                        break;
                    }

                    if (j == ch.length - 1) {//2
                        count++;//1
                        i += ch.length - 1;
                    }

                }

            }
            System.out.println(count);
        }
    }
}
